﻿@model ShSoft.Framework2015.LogSite.Model.Menu

@{
    ViewBag.Title = "Add";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section header{
    <link href="~/Content/css/MenuDetail.css" rel="stylesheet" />
    <script type="text/javascript" src="~/Content/js/Submited.js"></script>
}

@using (Ajax.BeginForm("AddConfirm", "Menu", new AjaxOptions { OnSuccess = "submited" }, new { id = "frmAdd" }))
{
    <div id="dvIframe">
        <table id="tblMain">
            <tr>
                <td class="tdTitle">@Html.LabelFor(x => x.PId)：</td>
                <td class="tdContent">
                    @Html.Hidden("PId", ViewBag.PId as string)
                    <input type="text" readonly="readonly" value="@ViewBag.PName" />
                </td>
            </tr>
            <tr>
                <td class="tdValidate" colspan="2">@Html.ValidationMessageFor(x => x.PId)</td>
            </tr>
            <tr>
                <td class="tdTitle">@Html.LabelFor(x => x.MenuName)：</td>
                <td class="tdContent">@Html.TextBoxFor(x => x.MenuName)</td>
            </tr>
            <tr>
                <td class="tdValidate" colspan="2">@Html.ValidationMessageFor(x => x.MenuName)</td>
            </tr>
            <tr>
                <td class="tdTitle">@Html.LabelFor(x => x.Level)：</td>
                <td class="tdContent">@Html.TextBoxFor(x => x.Level)</td>
            </tr>
            <tr>
                <td class="tdValidate" colspan="2">@Html.ValidationMessageFor(x => x.Level)</td>
            </tr>

            <tr>
                <td class="tdTitle">@Html.LabelFor(x => x.Sort)：</td>
                <td class="tdContent">@Html.TextBoxFor(x => x.Sort)</td>
            </tr>
            <tr>
                <td class="tdValidate" colspan="2">@Html.ValidationMessageFor(x => x.Sort)</td>
            </tr>
            <tr>
                <td class="tdTitle">@Html.LabelFor(x => x.IsLink)：</td>
                <td class="tdContent">
                    <select name="IsLink" id="txtIsLink">
                        <option value="true">是</option>
                        <option value="false">否</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="tdTitle">@Html.LabelFor(x => x.Url)：</td>
                <td class="tdContent">@Html.TextBoxFor(x => x.Url)</td>
            </tr>
            <tr>
                <td class="tdValidate" colspan="2">@Html.ValidationMessageFor(x => x.Url)</td>
            </tr>
            <tr>
                <td></td>
                <td class="tdContent">
                    <a href="#" onclick="javascript: $('#frmAdd').submit();" class="easyui-linkbutton" data-options="iconCls:'icon-add'">添加</a>
                </td>
            </tr>
        </table>
    </div>
}